/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.sistema.aplicacao;

/**
 *
 * @author gr
 */
public class  ThreadAtualiza extends Thread
{

    public ThreadAtualiza( int t )
    {
        current = 0;
        target = t;
    }

    public int getTarget()
    {
        return target;
    }

    public int getCurrent()
    {
        return current;
    }

    public void run()
    {
        while ( current < target && !interrupted() )
        {
            try
            {
                sleep( 3 );
            } catch ( InterruptedException e )
            {
                return;
            }
            current++;
        }
    }
    private int current;
    private int target;
}

